home *** CD-ROM | disk | FTP | other *** search
/ Champak 140 / (Vol 140) Sep 19 2011.iso / Games / theLifeArk.swf / scripts / __Packages / stateBar / toolsBar.as
Encoding:
Text File  |  2011-09-19  |  1.7 KB  |  78 lines

  1. class stateBar.toolsBar extends MovieClip
  2. {
  3.    var soundIsStop;
  4.    var musicIsStop;
  5.    var qltPanel;
  6.    var sndPath;
  7.    var confirmToMenu;
  8.    function toolsBar()
  9.    {
  10.       super();
  11.       this.soundIsStop._visible = false;
  12.       this.musicIsStop._visible = false;
  13.       this.qltPanel._visible = false;
  14.    }
  15.    function setQlt(p_qlt)
  16.    {
  17.       _global.ctn._quality = p_qlt;
  18.    }
  19.    function setSndPath(p_sndPath)
  20.    {
  21.       this.sndPath = p_sndPath;
  22.    }
  23.    function stopSound()
  24.    {
  25.       if(this.soundIsStop._visible == false)
  26.       {
  27.          this.soundIsStop._visible = true;
  28.          this.sndPath.stopSound();
  29.       }
  30.       else
  31.       {
  32.          this.soundIsStop._visible = false;
  33.          this.sndPath.returnSound();
  34.       }
  35.    }
  36.    function stopMusic()
  37.    {
  38.       if(this.musicIsStop._visible == false)
  39.       {
  40.          this.musicIsStop._visible = true;
  41.          this.sndPath.stopMusic();
  42.       }
  43.       else
  44.       {
  45.          this.musicIsStop._visible = false;
  46.          this.sndPath.returnMusic();
  47.       }
  48.    }
  49.    function menuBtnEvt()
  50.    {
  51.       this.confirmToMenu = this.attachMovie("confirmToMenu","confirmToMenu",this.getNextHighestDepth());
  52.    }
  53.    function activateQltPanel()
  54.    {
  55.       this.qltPanel._visible = true;
  56.       this.qltPanel.setLight(_global.ctn._quality);
  57.    }
  58.    function isStopVisible()
  59.    {
  60.       if(this.sndPath.isSoundPlay == true)
  61.       {
  62.          this.soundIsStop._visible = false;
  63.       }
  64.       else
  65.       {
  66.          this.soundIsStop._visible = true;
  67.       }
  68.       if(this.sndPath.isMusicPlay == true)
  69.       {
  70.          this.musicIsStop._visible = false;
  71.       }
  72.       else
  73.       {
  74.          this.musicIsStop._visible = true;
  75.       }
  76.    }
  77. }
  78.